<? if ($mvc->user->logged()) {?>
<form action="<?=$mvc->parse('{base_url}default/logout');?>" method="post">
	<?=$mvc->user->name?>
	<input type="submit" value="<?=$mvc->tr('Log out')?>"/>
</form>
<? } else {?>
<form action="<?=$mvc->parse('{base_url}default/login');?>" method="post">
	<input type="text" name="username" style="width:100px" />
	<input type="password" name="password" style="width:100px" /><br>
	<input type="submit" value="<?=$mvc->tr('Log in')?>"/>
</form>
<? } ?>